home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / PInterfaces / MacOSMediaPartitionMap.p < prev    next >
Text File  |  1996-05-01  |  4KB  |  119 lines

  1. {
  2.      File:        MacOSMediaPartitionMap.p
  3.  
  4.      Contains:    MacOS Partition Map Format definitions
  5.  
  6.      Version:    Technology:    Copland
  7.                  Release:    Universal Interfaces 3.0d3 on Copland DR1
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT MacOSMediaPartitionMap;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __MACOSMEDIAPARTITIONMAP__}
  28. {$SETC __MACOSMEDIAPARTITIONMAP__ := 1}
  29.  
  30. {$I+}
  31. {$SETC MacOSMediaPartitionMapIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __TYPES__}
  35. {$I Types.p}
  36. {$ENDC}
  37.  
  38. {$PUSH}
  39. {$ALIGN MAC68K}
  40. {$LibExport+}
  41.  
  42. {$IFC FOR_SYSTEM8_PREEMPTIVE }
  43. {
  44.  * Prior to System 8 these structures are defined in SCSI.h
  45. }
  46. {  Signatures  }
  47.  
  48. CONST
  49.     sbSIGWord                    = $4552;                        {  signature word for Block 0 ('ER')  }
  50.     sbMac                        = 1;                            {  system type for Mac  }
  51.     pMapSIG                        = $504D;                        {  partition map signature ('PM')  }
  52.     pdSigWord                    = $5453;
  53.  
  54.     oldPMSigWord                = $5453;
  55.     newPMSigWord                = $504D;
  56.  
  57. {  Driver Descriptor Map  }
  58.  
  59. TYPE
  60.     Block0Ptr = ^Block0;
  61.     Block0 = PACKED RECORD
  62.         sbSig:                    INTEGER;                                {  unique value for SCSI block 0  }
  63.         sbBlkSize:                INTEGER;                                {  block size of device  }
  64.         sbBlkCount:                LONGINT;                                {  number of blocks on device  }
  65.         sbDevType:                INTEGER;                                {  device type  }
  66.         sbDevId:                INTEGER;                                {  device id  }
  67.         sbData:                    LONGINT;                                {  not used  }
  68.         sbDrvrCount:            INTEGER;                                {  driver descriptor count  }
  69.         ddBlock:                LONGINT;                                {  1st driver's starting block  }
  70.         ddSize:                    INTEGER;                                {  size of 1st driver (512-byte blks)  }
  71.         ddType:                    INTEGER;                                {  system type (1 for Mac+)  }
  72.         ddPad:                    ARRAY [0..242] OF INTEGER;                {  ARRAY[0..242] OF INTEGER; not used  }
  73.     END;
  74.  
  75. { Driver descriptor }
  76.     DDMapPtr = ^DDMap;
  77.     DDMap = RECORD
  78.         ddBlock:                LONGINT;                                {  1st driver's starting block  }
  79.         ddSize:                    INTEGER;                                {  size of 1st driver (512-byte blks)  }
  80.         ddType:                    INTEGER;                                {  system type (1 for Mac+)  }
  81.     END;
  82.  
  83. {  Partition Map Entry  }
  84. {  packed in ".i" }
  85.     PartitionPtr = ^Partition;
  86.     Partition = PACKED RECORD
  87.         pmSig:                    INTEGER;                                {  unique value for map entry blk  }
  88.         pmSigPad:                INTEGER;                                {  currently unused  }
  89.         pmMapBlkCnt:            LONGINT;                                {  # of blks in partition map  }
  90.         pmPyPartStart:            LONGINT;                                {  physical start blk of partition  }
  91.         pmPartBlkCnt:            LONGINT;                                {  # of blks in this partition  }
  92.         pmPartName:                PACKED ARRAY [0..31] OF UInt8;            {  ASCII partition name  }
  93.         pmParType:                PACKED ARRAY [0..31] OF UInt8;            {  ASCII partition type  }
  94.         pmLgDataStart:            LONGINT;                                {  log. # of partition's 1st data blk  }
  95.         pmDataCnt:                LONGINT;                                {  # of blks in partition's data area  }
  96.         pmPartStatus:            LONGINT;                                {  bit field for partition status  }
  97.         pmLgBootStart:            LONGINT;                                {  log. blk of partition's boot code  }
  98.         pmBootSize:                LONGINT;                                {  number of bytes in boot code  }
  99.         pmBootAddr:                LONGINT;                                {  memory load address of boot code  }
  100.         pmBootAddr2:            LONGINT;                                {  currently unused  }
  101.         pmBootEntry:            LONGINT;                                {  entry point of boot code  }
  102.         pmBootEntry2:            LONGINT;                                {  currently unused  }
  103.         pmBootCksum:            LONGINT;                                {  checksum of boot code  }
  104.         pmProcessor:            PACKED ARRAY [0..15] OF UInt8;            {  ASCII for the processor type  }
  105.         pmPad:                    ARRAY [0..187] OF INTEGER;                {  ARRAY[0..187] OF INTEGER; not used  }
  106.     END;
  107.  
  108. {$ENDC}
  109. {$ALIGN RESET}
  110. {$POP}
  111.  
  112. {$SETC UsingIncludes := MacOSMediaPartitionMapIncludes}
  113.  
  114. {$ENDC} {__MACOSMEDIAPARTITIONMAP__}
  115.  
  116. {$IFC NOT UsingIncludes}
  117.  END.
  118. {$ENDC}
  119.